import Vue from 'vue';
// /*import {} from '@/types'*/
/*
 * props
 */
export namespace N_cAlarmQuery {
  export interface cAlarmQuery extends Vue {}

  // eslint-disable-next-line no-shadow
  export enum V_ecDatatype {
    Float32 = 0,
    Float64,
    Int8,
    Int16,
    Int32,
    Int64,
    UInt8,
    UInt16,
    UInt32,
    UInt64,
    DateTime,
    Date,
    Time,
    Bool,
    String,
    Bit
  }

  // eslint-disable-next-line no-shadow
  export enum V_ecBoxType {
    NOTSET = 0,
    MITSUBISHI_PLC_Q,
    SIEMENS_PLC_S7_1500,
    SIEMENS_PLC_S7_200_SMART
  }

  // eslint-disable-next-line no-shadow
  export enum V_ecReadWrite {
    ReadAndWrite = 0,
    Read,
    Write
  }

  export interface I_readResp {
    success: boolean;
    msg: string;
    data: Map<
      string,
      {
        dataType: V_ecDatatype;
        controllerType: V_ecBoxType;
        val: any;
        err: string;
      }
    >;
  }

  export interface I_ecBoxDet {
    id?: string;
    code: string;
    title: string;
    dataType?: V_ecDatatype;
    readWrite?: V_ecReadWrite;
    val?: string;
    err?: string;
    timestamp?: string;
    conversionRate?: number;
    alarmTags: number[];
  }
  export interface I_qryDataResp {
    success: boolean;
    msg: string;
    // data: Map<
    //   string,
    //   {
    //     d: Array<{ t: string; v: any }>;
    //     total: number;
    //   }
    // >;
    data: string;
  }
  export interface I_qryDataReq {
    ecCodes: string[];
    beginTime: string;
    endTime: string;
    pageNo: number;
    pageSize: number;
    filter?: Object;
  }

  export interface I_treeRowData {
    alarm_classification: string;
    content?: string | null;
    id: string;
    'm2o|p_id|dimension_query|alarm_classification'?: string | null;
    p_id?: string | null;
    children?: I_treeRowData[];
  }

  export interface I_alarmContent {
    code: string;
    title: string;
    // eslint-disable-next-line camelcase
    conversion_rate: number;
  }
}
